package demoMod.stsconsole.chests;

import demoMod.stsconsole.dungeons.AbstractDungeon;
import demoMod.stsconsole.relics.AbstractRelic;
import demoMod.stsconsole.rewards.GoldReward;
import demoMod.stsconsole.rewards.RelicReward;

public class LargeChest extends AbstractChest {
    @Override
    public void open() {
        int roll = AbstractDungeon.cardRewardRng.nextInt(100);
        if (roll < 34) {
            AbstractDungeon.currDungeon.currMapNode.room.rewards.add(new RelicReward(AbstractRelic.RelicRarity.RARE));
            roll = AbstractDungeon.cardRewardRng.nextInt(3);
            if (roll < 2) {
                AbstractDungeon.currDungeon.currMapNode.room.rewards.add(new GoldReward(65, 75));
            }
        } else {
            AbstractDungeon.currDungeon.currMapNode.room.rewards.add(new RelicReward(AbstractRelic.RelicRarity.UNCOMMON));
            AbstractDungeon.currDungeon.currMapNode.room.rewards.add(new GoldReward(65, 75));
        }
        super.open();
    }
}
